/*
 * VPSG.H Version 1.01 (C)1995,1996 HUDSON SOFT
 * PSGライブラリ用 Ｃコンパイラ用ヘッダーファイル(VPSG.H)
 */
#ifndef _VPSG_H_
#define _VPSG_H_

#define CH1   0x01
#define CH2   0x02
#define CH3   0x04
#define CH4   0x08
#define CH5   0x10
#define CH6   0x20
#define CH1_6 0x3f

#define MUSIC_SW  0x01
#define EFFECT_SW 0x02

int psg_drvinit( void );

int psg_drvon( void );
void psg_drvoff( void );

int psg_drvcall( void );

struct vpsgdata {
	unsigned *mus_top;
	unsigned *eff_top;
	unsigned *wave_top;
	unsigned *env_top;
	unsigned *lfo_top;
	unsigned *pe_top;
	unsigned *pc_top;
};
void psg_dataset( struct vpsgdata *indtop );
void psg_musicset( unsigned *mdata );
void psg_effectset( unsigned *edata );
void psg_waveset( unsigned *wavedata );
void psg_envset( unsigned *envdata );
void psg_lfoset( unsigned *lfodata );
void psg_pcset( unsigned *pcdata );
void psg_peset( unsigned *pedata );

int psg_musicno( int data );
int psg_effectno( int data );

void psg_priset( unsigned char *pridata );
int psg_delayset( int cnt );

void psg_allstop( void );
void psg_musicstop( void );
void psg_effectstop( void );
void psg_allpause( void );
void psg_musicpause( void );
void psg_effectpause( void );
void psg_allpsoff( void );
void psg_musicpsoff( void );
void psg_effectpsoff( void );
int  psg_allfdout( int speed );
int  psg_musicfdout( int speed );
int  psg_effectfdout( int speed );
int  psg_musicmvol( int vol );
int  psg_effectmvol( int vol );
int  psg_musicfdin( int speed );
int  psg_effectfdin( int speed );
int  psg_switch( void );
int  psg_musicch( void );
int  psg_effectch( void );
int  psg_musicnochk( void );
int  psg_effectnochk( void );
void psg_musicchoff( int chbit );
void psg_effectchoff( int chbit );
void psg_musicchon( int chbit );
void psg_effectchon( int chbit );
void psg_musicstop_ch( int chbit );
void psg_effectstop_ch( int chbit );
int  psg_musicmvolget( void );
int  psg_effectmvolget( void );
int  psg_musicpsoff_fdin( int speed );
int  psg_effectpsoff_fdin( int speed );
int  psg_musicpanset( int pan );
int  psg_effectpanset( int pan );
int  psg_stereo_mono( void );
int  psg_acheck( void );
void psg_mainvolset( int vol_l, int vol_r );
int  psg_versionget( void );
int  psg_drvworkread(int wkno, int offset );
int  psg_drvworkwrite(int wkno, int offset, int data );

#endif /* _VPSG_H_ */
